//
//  SDProductDetailVC.m
//  skinDetection
//
//  Created by  liangzhun on 2018/11/16.
//  Copyright © 2018年  liangzhun. All rights reserved.
//

#import "SDProductDetailVC.h"

@interface SDProductDetailVC ()

@end

@implementation SDProductDetailVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.navHeight.constant = SDNavBar_Height;
    
    //如果有图片就加载图片
    if (self.list.length > 0) {
        [self.prdouctImage sd_setImageWithURL:[NSURL URLWithString:self.list] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
            //等比例缩放图片
            self.imageHeight.constant = SDMainScreenWidth/image.size.width * image.size.height;
        }];
    }
   
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (IBAction)back:(UIButton *)sender {
    [self.navigationController popViewControllerAnimated:YES];
}
@end
